package com.java.gamePackeg.event;

import com.java.gamePackeg.Player;
import com.java.gamePackeg.Product;
import com.java.gamePackeg.XianLiveMain;

import javax.swing.*;
import java.util.List;

public class FuPoEvent implements Event {
    private static final int QICHE = 2;

    @Override
    public void event(Player player, List<Product> marketProList) {
        JOptionPane.showMessageDialog(null, "遇到富婆，送我" + QICHE + "辆小汽车");
        Product product = XianLiveMain.getProList().get(3);
        //设定当前价格为0
        product.setNowPrice(0);
        player.buyPro(product, QICHE, false);
    }


}
